@extends('layouts.master')

@section('title')
@stop

@section('content')
<!-- display the specified group -->
<div class="panel panel-default text-center">
	<div class="panel-heading">
    	<h3 class="panel-title">{{ $group->name }}</h3>
    </div>
    <div class="panel-body">
		<p>{{ HTML::image($group->image, $group->name.'_image', array('class' => 'img-circle', 'style' => 'max-width: 200px; height: 200px;')) }}</p>
		<p>Administrador: {{ $group->admin->name.' '.$group->admin->lastname }}</p>
		<table class="table table-striped table-bordered">
			<thead>
				<tr>
					<td>ID</td>
					<td>Nombre</td>
					<td>Apellido</td>
					<td>Edad</td>
					<td>Email</td>
					<td>Sexo</td>
					<td>Hincha de</td>
					<td>Ubicación</td>
				</tr>
			</thead>
			<tbody>
			<!-- display the group members -->
			@foreach($group->users as $key => $value)
				<tr>
					<td>{{ $value->id }}</td>
					<td>{{ $value->name }}</td>
					<td>{{ $value->lastname }}</td>
					<td>{{ $value->age }}</td>
					<td>{{ $value->email }}</td>
					<td>{{ $value->sex }}</td>
					<td>{{ $value->fanOf }}</td>
					<td>{{ $value->location }}</td>
				</tr>
			@endforeach
			</tbody>
		</table>
	</div>
</div>
<p><a class="btn btn-default" href="{{ URL::to('groups') }}">&lt;&lt; Volver</a></p>
@stop
